﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="rss.aspx.vb" Inherits="Assignment_2___Prototype.rss" ContentType="text/xml" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="UserSqlDataSource1">
    
    <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title>List of User Details</title>
        <description>
          Registration Details.
        </description>
  </HeaderTemplate>

  <ItemTemplate>
        <item>
        
            <userid><%# (DataBinder.Eval(Container.DataItem,"userid"))%></userid>
                                          
            <username><%# (DataBinder.Eval(Container.DataItem,"username"))%></username>                              
         
            <email><%# DataBinder.Eval(Container.DataItem, "email")%></email>
                   
            <title><%# (DataBinder.Eval(Container.DataItem,"title"))%></title>
                                             
            <firstname><%# (DataBinder.Eval(Container.DataItem,"firstname"))%></firstname>
             
            <lastname><%# (DataBinder.Eval(Container.DataItem,"lastname"))%></lastname>                                  
            
            <dateofbirth><%# (DataBinder.Eval(Container.DataItem, "DOB"))%></dateofbirth>
                                                              
        </item>                               
  </ItemTemplate>

  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
    </asp:Repeater>
    
    
    <div>
        <asp:SqlDataSource ID="UserSqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UserConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:UserConnectionString.ProviderName %>" 
        SelectCommand="SELECT [UserID], [Username], [Email], [Title], [FirstName], [LastName], [DOB] FROM [User]">
        </asp:SqlDataSource>
    </div>
    
    </form>
</body>
</html>
